//
//  Observation.m
//  Pennyworth
//
//  Created by Chris Karr on 12/24/07.
//  Copyright 2007 Chris J. Karr. All rights reserved.
//

#import "Observation.h"

@implementation Observation

@synthesize sensor;
@synthesize observation;
@synthesize date;
@synthesize duration;

- (NSString *) description
{
	if ([self.observation isKindOfClass:[NSArray class]])
	{
		NSArray * obsArray = (NSArray *) self.observation;
		
		NSMutableString * desc = [NSMutableString stringWithString:@"[ "];
		
		for (NSObject * item in obsArray)
			[desc appendString:[NSString stringWithFormat:@"%@, ", item]];
			
		[desc appendString:@"]"];
		
		return desc;
	}
	else
		return [self.observation description];
}

@end
